package com.cly.item.controller;

import com.cly.common.entity.item.dto.ScheduleItemDTO;
import com.cly.common.entity.result.Result;
import com.cly.item.service.TimingItemService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/timingItem")
@Slf4j
public class TimingItemController {
    @Autowired
    private TimingItemService timingItemService;

    @PostMapping("/scheduleTask")
    public Result scheduleAddItem(@RequestBody ScheduleItemDTO scheduleItemDTO){
        return timingItemService.scheduleAddItem(scheduleItemDTO);
    }
}
